<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Gray发布系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/xadmin.css">
    <link rel="stylesheet" href="/static/lib/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/swiper.min.css">
    <script type="text/javascript" src="/static/js/jquery.min.js"></script>
    <script type="text/javascript" src="/static/js/swiper.jquery.min.js"></script>
    <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/js/xadmin.js"></script>


</head>
<body>
{% include "public/top.html" %}
<!-- 中部开始 -->
<div class="wrapper">
    {% include "public/left_menu.html" %}
    <!-- 右侧主体开始 -->
    <div class="page-content">
        <div class="content">
            <!-- 右侧内容框架，更改从这里开始 -->
            <form class="layui-form" action="/opt-search/">
                <div class="layui-form-pane" style="text-align: left;">
                    <div class="layui-form-item" style="display: inline-block;">

                        <div class="layui-input-inline">
                            <input type="text" name="opt_name" value="{{ opt_name }}" placeholder="请输入机器名" autocomplete="off"
                                   class="layui-input">

                        </div>

                        <div class="layui-input-inline" style="width:190px">
                            <button class="layui-btn" lay-submit="" lay-filter="sreach" id="opt_search">
                                <i class="layui-icon">&#xe615;</i></button>


                            <a href="javascript:;" class="layui-btn layui-btn-danger"
                               onclick="opt_add('添加机器','/opt-build/','540','580')">
                                添加机器
                            </a>
                        </div>
                    </div>
                </div>
            </form>
            <span class="x-right" style="line-height:40px">共有数据：{{ list.count }} 条</span>
            <table class="layui-table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>机器名</th>
                    <th>部署路径</th>
                    <th>机器IP</th>
                    <th>机器账户</th>
                    <th>访问类型</th>
                    <th>机器说明</th>
                    <th>创建时间</th>
                </tr>
                </thead>
                <tbody>
                {% for l in list %}
                    <tr>
                        <td>{{ l.id }}</td>
                        <td>{{ l.opt_name }}</td>
                        <td>{{ l.opt_addr }}</td>
                        <td>{{ l.host }}</td>
                        <td>{{ l.username }}</td>
                        <td>
                            {% if l.pwd_type == 1 %}
                                密码
                            {% else %}
                                秘钥
                            {% endif %}
                        </td>
                        <td>{{ l.opt_desc }}</td>

                    <td>{{ l.create_at | date:"Y-m-d H:i:s" }}</td>
                </tr>
                {% endfor %}
                </tbody>
            </table>
            <!-- 右侧内容框架，更改从这里结束 -->
        </div>
    </div>
    <!-- 右侧主体结束 -->
</div>
<!-- 中部结束 -->
{% include "public/bottom.html" %}
{% include "public/bg_change.html" %}
<script>
    function member_add(title, url, w, h) {
        x_admin_show(title, url, w, h);
    }

    function opt_add(title, url, w, h) {
        x_admin_show(title, url, w, h);
    }
</script>
</body>
</html>